home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / uartbug.zip / UART.DOC < prev   
Text File  |  1987-03-09  |  4KB  |  86 lines

  1.  
  2.  
  3. UART.COM is a memory resident utility that allows you to read and write the
  4. com1 or com2 uart registers using a pop up that appears when you press
  5. ctl-alt-lftshft.  It is a highly modified version of the printer setup util-
  6. ity published by PC magazine and will not co-exist with the original utility
  7. and also will not work with their dos-edit utility.  It will also conflict
  8. with any programs that the original utility had a problem with.
  9.  
  10. Use is fairly much self-explanatory.
  11.  page up  -   selects com1 (beeps if no com1)
  12.  page dn  -   selects com2 (beeps if no com2)
  13.  lft arw  -   reads the register pointed to by the '>'
  14.  rgt arw  -   writes the byte at the btm of the pop up to the slctd reg
  15.  up/dn arw -  slcts register to read or write
  16.  0-9, A-F  -  hex entry of byte to write to a reg (appears at btm of pop up)
  17.  ESC       -  exit pop up
  18.  ctl-alt-lftshft - activate pop up
  19.  
  20. Registers were not all read and displayed when the pop up is opened due to
  21. the fact that reading a register may affect the status of other registers
  22. you wish to monitor.  Ex: Reading the rx holding register changes the data
  23. ready bit of the line status register (this is not the only one that could
  24. change the status of other regs or I would have wrote around it).
  25.  
  26. Included is the modified source also.  It was a quickie I put together
  27. to use in debugging some async routines I was working on so don't look for
  28. pretty code (its a mess but it works as long as it don't bump into some
  29. of your other ram residents).  It works from within Codeview if you use that
  30. and provides immediate access to the UART regs while debugging code.
  31. It will also work from within your favorite com program and you can see
  32. what interrupts they enable etc. but would not be a good idea to change
  33. anything.  Following is quick summary of uart regs based on com1 address,
  34. com2 is same except 2fx:
  35.  
  36. 3f8 -  rx/tx hold reg (lsb of baud dvsr if bit 7 of LCR set)
  37.  (data in and out)
  38. 3f9 IER - interrupt enable reg (msb of baud dvsr if bit 7 of LCR set)
  39.  (who can interrupt?)
  40.   bit0 - enable rx data rdy intrpt
  41.   bit1 - enable tx hold reg empty intrpt
  42.   bit2 - enable receiver line status intrpts
  43.   bit3 - enable modem status intrpts
  44. 3fa IIR - interrupt identification register
  45.  (what caused interrupt?)
  46.   bit0 - set to ZR of interrupt pending
  47.   bits 2 & 1:
  48.    00 - ring indicator/line signal detect/modem status  interrupt
  49.    01 - tx hold reg empty caused intrpt
  50.    10 - byte ready in rx hold reg
  51.    11 - overrun/parity/framing error or line break received
  52. 3fb LCR - line control register
  53.    bits 1 & 0: number of data bits
  54.    bit2      : number of stop bits
  55.    bits 4 & 3: parity            (data,stop,parity bits same as for bios call)
  56.    bit5      : stick parity
  57.    bit6      : set break
  58.    bit7      : if high 3f8 & 3f9 are r/w regs for baud rate divisor (norm low)
  59. 3fc MCR - modem control register
  60.    bit0 - DTR (data terminal ready)
  61.    bit1 - RTS (request to send)
  62.    bit2 - output1 (not used by anything I've seen)
  63.    bit3 - output2 (set high to enable com port intrpts to intrpt controller)
  64. 3fd LSR - line status register
  65.    bit0 - data is ready to read from rx hold register
  66.    bit1 - overrun error occurred
  67.    bit2 - parity error occurred
  68.    bit3 - framing error occurred
  69.    bit4 - break was received
  70.    bit5 - tx holding reg is empty (rdy for another byte to tx)
  71.    bit6 - tx shft reg is empty
  72. 3fe MSR - modem status register
  73.    bit0 - DCTS delta clear to send (a chng in clr to send has been detected)
  74.    bit1 - DDSR delta data set rdy (chng in DSR detected)
  75.    bit2 - TERI trailing edge ring indicator
  76.    bit3 - DRLSD - delta received line signal detect
  77.    bit4 - CTS clear to send
  78.    bit5 - DSR data set ready
  79.    bit6 - RI ring indicator
  80.    bit7 - RLSD received line signal detect
  81.  
  82. Mike Dumdei               can be reached at:
  83. 6 Holly Lane               Split Up the Middle BBS   214 838-6713
  84. Texarkana, TX 75503        Texarkana, TX
  85.  
  86.